Python frozenset function